(function($) {
	$(window).load(function(e) {
		$('[name="tahun"]').val($('#tahun').val());
		$('[name="bulan"]').val($('#bulan').val());
		
		$("table#da-ex-datatable-numberpaging").dataTable({
			"aaSorting": [[ 0, "asc" ]],
			"aoColumns": [
				null,
				null,
				null
			],
			"oLanguage": {
                "sUrl": "plugins/datatables/dataTables.indonesian.txt"
            },
			sPaginationType: "full_numbers"	
		});
		
		var oTable = $('#da-ex-datatable-numberpaging').dataTable( );
		var arr = oTable.fnGetData();
		
		$.jqplot.config.enablePlugins = true;
		var s1 = new Array();
		var ticks = new Array();
		for(var i=0;i<arr.length;i++){
			s1[i] = parseInt(arr[i][2]);
		
			ticks[i] = arr[i][1];
			
		}
		
         
        plot1 = $.jqplot('chart-jenis-perkara', [s1], {
            // Only animate if we're not using excanvas (not in IE 7 or IE 8)..
            animate: !$.jqplot.use_excanvas,
            seriesDefaults:{
                renderer:$.jqplot.BarRenderer,
                pointLabels: { show: true }
            },
            axes: {
                xaxis: {
                    renderer: $.jqplot.CategoryAxisRenderer,
                    ticks: ticks
                }
            },
            // Pad the y axis just a little so bars can get close to, but
            // not touch, the grid boundaries.  1.2 is the default padding.
            yaxis: {
                pad: 1.05,
                tickOptions: {formatString: '$%d'}
            },
            highlighter: { show: false }
        });
	});
}) (jQuery);
